<extend name="Public/base"/>

<block name="body">
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>新增推送消息</h2>
    </div>
    <ul class="tab-nav nav">


        <li class="current"><a href="javascript:void(0)">基本信息</a></li>

    </ul>
    
    <form action="{:U()}" method="post" class="form-horizontal">
    <div class="tab-content">
        <div class="form-item">
            <label class="item-label">标题<span class="check-tips">（标题必须填写）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$vo.title}">
            </div>
        </div>

        <div class="form-item">
            <label class="item-label">选择项目名称<span class="check-tips">（项目必须选择）</span></label>
            <div class="controls">
                <select name="project_id" style="width:200px;">
                    <option value="">请选择项目名称</option>
                    <volist name="project" id="sty">
                        <option value="{$sty.id}" <?php if($vo['project_id']==$sty[id]){echo 'selected';} ?>>{$sty.title}</option>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-item">
            <label class="item-label">推送内容：</label>
            <div class="controls">
                <label class="textarea" style="width:400px;">
                    <textarea name="content">{$vo.content}</textarea>
                </label>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">验证码：</label>
            <div class="controls">
                <input type="text" class="text input-large" name="verify" value="" placeholder="输入验证码" style="float: left; height:40px;width:240px;" />
                <img class="verifyimg" src="{:U('Public/verify')}" style="float: left; margin-left:10px; height:50px; width:150px; cursor: pointer;" />
            </div>
        </div>


        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </div>
   
    </form>
</block>

<block name="script">
<include file="Public:datetime" />
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('System/index')}');

        var verifyimg = $(".verifyimg").attr("src");
        $(".verifyimg").click(function(){
            if( verifyimg.indexOf('?')>0){
                $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
            }else{
                $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
            }
        });
    </script>
</block>
